package 第三章作业.第二次;

import java.util.Scanner;
public class Test7 {
    public static void main(String[] args){
        System.out.println("您是会员吗（yes or no）");
        Scanner reader = new Scanner(System.in);
        String n = reader.next();
        System.out.println("请输入商品总价：");
        double price = reader.nextDouble();
        if("yes".equals(n)){
            if(price > 0 && price < 100){
                System.out.printf("最终付款金额为%.2f",price*0.9);
            }
            if(price >= 100){
                System.out.printf("最终付款金额为%.2f",price*0.8);
            }
        }
        else if("no".equals(n)){
            if(price > 0 && price < 100){
                System.out.printf("最终付款金额为%.2f",price);
            }
            if(price >= 100){
                System.out.printf("最终付款金额为%.2f",price*0.9);
            }
        }
    }
}
